import React, { Component, PureComponent } from "react";
import Popup from "../../components/Popup";
import "./index.less";

export default class Popop1Test extends PureComponent {
  constructor(props) {
    super(props);
    this.state = { showPopup: false };
  }

  render() {
    let { showPopup } = this.state;
    return (
      <div>
        <Popup
          width={"100%"}
          height={"50%"}
          direction="bottom"
          contentClass="comment-popup"
          ref={(popup) => {
            this.popup = popup;
          }}
          show={showPopup}
          clickMask={() => {
            this.setState({ showPopup: false });
          }}
        >
          <div className="dot"></div>
          <div>2</div>
          <div>123</div>
        </Popup>

        <button
          onClick={() => {
            this.setState({ showPopup: true });
          }}
        >
          显示
        </button>
      </div>
    );
  }
}
